
class _Stack:
	"""
	通过数据格式List,实现Stack
	"""
	def __init__(self):
		self.items = []

	def push(self, item):
		return self.items.append(item)

	def pop(self):
		return self.items.pop()

	def peek(self):
		return self.items[-1]
	
	def size(self):
		return len(self.items)

	def is_Empty(self):
		return True if self.size() == 0 else False

	def reverse(self):
		return self.items[::-1]


def ten_2_any(x):
	# ten = int(input('please input your ten_num：'))
	ten = 233
	s = _Stack()
	while ten:
		ten, div_mode = ten // int(x), ten % int(x)
		s.push(div_mode)
	res = [str(i) for i in s.reverse()]
	# return ''.join(s.reverse())
	return ''.join(res)

if __name__ == "__main__":
	res = ten_2_any(2)
	print(res)
